﻿using System;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;

namespace UserADGroupREST
{
    [ServiceContract]
    public interface IUserInGroup
    {
        //JSON output
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "userInGroup/{userToValidate}/{groupDomain}/{groupToValidate}")]
        bool userInGroup(string userToValidate, string groupDomain, string groupToValidate);

        //XML output for InfoPath
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "userInGroupXML/{userToValidate}/{groupDomain}/{groupToValidate}")]
        bool userInGroupXML(string userToValidate, string groupDomain, string groupToValidate);
    }
}
